import React from 'react'
import styles from './CustomNode1.less'

import type { NsGraph } from '@antv/xflow-core';

const CustomNode1: NsGraph.INodeRender<any> = (props) => {
    
    const {
        size = { width: 120, height: 50 },
        data
    } = props
    const { width, height } = size
    const { label, stroke, fill, fontFill, fontSize } = data

    return (
        <div
            className={styles['container']}
            style={{
                width,
                height,
                borderColor: stroke,
                backgroundColor: fill,
                color: fontFill,
                fontSize,
            }}
        >
            <span>{label}</span>
        </div>
    )
}

export default CustomNode1